<div class="form-actions content-header">
	<h1 class="pull-left"><?= $title ?></h1>
	<? if (!empty($search_indexes)): ?>
		<form id="search" action="<?= URL::base() ?>administration/Asearch/" method="post" style="margin: 0; padding: 0">
			<div class="input-prepend pull-right">
				<div class="btn-group">
					<button class="btn" type="submit" tabindex="-1">Найти<i class="icon-search" style="margin-left: 10px"></i></button>
					<button class="btn dropdown-toggle" data-toggle="dropdown" tabindex="-1">
						<span class="caret"></span>
					</button>
					<ul class="dropdown-menu">
						<li class="dropdown-header">Где искать</li>
						<li class="divider"></li>
						<? foreach ($search_indexes as $key => $item): ?>
							<li><a href="javascript:void(0)" onclick="setSearchState(this)" search_in="<?= $item['field'] ?>"><?= $item['title'] ?></a></li>
						<? endforeach ?>
					</ul>
				</div>
				<input type="hidden" name="model" value="<?= $model ?>">
				<input type="hidden" name="table" value="<?= $table ?>">
				<input type="hidden" name="search_in" value="<?= $search_indexes[0]['field'] ?>">
				<input type="text" name="query" placeholder="<?= $search_indexes[0]['title'] ?>">
			</div>
		</form>
	<? endif ?>
</div>
<?= $content ?>